package com.itheima.springbootmybatis.mapper;

import com.itheima.springbootmybatis.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {

// @Select：mybatis提供的注解，用来执行SQL语句，这里的select语句用来查询id为#{id}的用户信息
    @Select("SELECT * FROM user WHERE id = #{id}")
    public User findById(Integer id);
}
